<template>
  <div class="about">
    <h1>This is an about page</h1>
    <my-child></my-child>
    <button @click="handlerFun2">调用fun2</button>

    <h1>{{ obj.name }}</h1>
    <button @click="obj.name = '小红'">改变name</button>
    <h1>{{ obj.age }}</h1>
    <button @click="add">添加age</button>
  </div>
</template>
<script>
// import mixin from "../utils/mixin/mixin.js";

export default {
  // mixins: [mixin],
  data() {
    return {
      obj: {
        name: "小明",
      },
    };
  },

  created() {
    this.$store.dispatch("getData");
  },
  methods: {
    handlerFun2() {
      this.$fun2();
    },
    add() {
      // this.obj.age = 18;
      this.$set(this.obj, "age", 18);
    },
  },
};
</script>
